package com.hjwoo.app.ui;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import com.hjwoo.app.R;

public class ModifyAvatarDialog extends Dialog implements OnClickListener
{
    private Button mImg;
    private Button mPhone;
    private Button mCancel;

    public ModifyAvatarDialog(Context context)
    {
        super(context);
    }

    public ModifyAvatarDialog(Context context, int theme)
    {
        super(context, theme);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gl_modify_avatar_choose_dialog);
        Window win = getWindow();
//		win.getDecorView().setPadding(0, 0, 0, 0);
        win.setGravity(Gravity.BOTTOM);
        WindowManager.LayoutParams lp = win.getAttributes();
        lp.width = WindowManager.LayoutParams.MATCH_PARENT;
//		lp.height = wm.getDefaultDisplay().getHeight()/2;
        win.setAttributes(lp);
        mImg = (Button) this.findViewById(R.id.gl_choose_img);
        mPhone = (Button) this.findViewById(R.id.gl_choose_phone);
        mCancel = (Button) this.findViewById(R.id.gl_choose_cancel);
        mImg.setOnClickListener(this);
        mPhone.setOnClickListener(this);
        mCancel.setOnClickListener(this);
    }

    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
        case R.id.gl_choose_img:
            doGoToImg();
            break;
        case R.id.gl_choose_phone:
            doGoToPhone();
            break;
        case R.id.gl_choose_cancel:
            dismiss();
            break;
        }
    }

    public void doGoToImg()
    {
    }

    public void doGoToPhone()
    {
    }
}
